﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Home.aspx.cs" Inherits="ReporteTrafico.Home" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <!--
    Designed by CompanyName
    Base template (without user's data) checked by http://validator.w3.org : "This page is valid XHTML 1.0 Transitional"
    -->
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <title>..:: ReporteTráfico.com ::.. - Configuración de Reportes</title>

    <script type="text/javascript" src="script.js"></script>

    <link rel="stylesheet" href="style.css" type="text/css" media="screen" />

    <style type="text/css">
        .art-PostHeader
        {
            font-family: "Adobe Caslon Pro Bold";
            font-size: small;
            color: #F5E693;
            font-weight: 700;
        }
        .PostHeader
        {
            text-align: justify;
        }
    </style>

</head>
<body>
    <form id="formHome" runat="server">
    <div id="art-main">
        <div class="art-Sheet">
            <div class="art-Sheet-tl"></div>
            <div class="art-Sheet-tr"></div>
            <div class="art-Sheet-bl"></div>
            <div class="art-Sheet-br"></div>
            <div class="art-Sheet-tc"></div>                                                                                                                                                                                                                                                                                                                                                                                                                                                 
            <div class="art-Sheet-bc">
                They seem to make lots of good <a href="http://www.flashmint.com/">flash 
                templates.</a> </div>
            <div class="art-Sheet-cl"></div>
            <div class="art-Sheet-cr"></div>
            <div class="art-Sheet-cc"></div>
            <div class="art-Sheet-body">
                <div class="art-Header">
                    <div class="art-Header-jpeg"></div>
                    <div class="art-Logo">
                        <h1 id="name-text" class="art-Logo-name">ReporteTráfico.com</h1>
                        <div id="slogan-text" class="art-Logo-text">el reporte del tráfico en tus manos...</div>
                        
                    </div>
                </div>
                <div class="art-nav">
                	<div class="l"></div>
                	<div class="r"></div>
                	<ul class="art-menu">
                		<li><a href="index.aspx"><span class="l"></span><span class="r"></span><span class="t">
                            Inicio</span></a></li>
                		<li><a href="ConsultaTrafico.aspx"><span class="l"></span><span class="r"></span><span class="t">
                            Consulta Tráfico</span></a></li>
                        <li><a href="ConsultaUltimoReporteGenerado.aspx"><span class="l"></span><span class="r"></span><span class="t">
                            Consultar Último Reporte Generado</span></a></li>
                    </ul>
                </div>
               </div>
                <div class="art-contentLayout">
                    <div class="art-content">
                        <div class="art-Post">
                            <div class="art-Post-body">
                        

                            <div class="art-PostContent">
                                  <!-- Aqui va el contenido -->
                                    <table width="615px">
                                        <tr>
                                            <td>
                                                 Personalice su reporte. Configure ubicación y hora de los reportes de tráfico 
                                                 que desea recibir a través de SMS
                                            </td>                
                                        </tr>
                                        
                                        <tr>
                                            <td>
                                                <table  align="center">
                                                    <tr>
                                                        <td>
                                                            Ubicación
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="DropDownListUbicacion" Width="210px"  runat="server" 
                                                                AutoPostBack="True" OnSelectedIndexChanged="GeneraSentido">
                                                                <asp:ListItem Text="--  Seleccione --" Selected="True"></asp:ListItem>
                                                            </asp:DropDownList>
                                                            
                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorUbicacion" runat="server"  
                                                                    ControlToValidate="DropDownListUbicacion" InitialValue="--  Seleccione --"
                                                                    ErrorMessage="* Debe indicar Ubicación" ForeColor="#FFCC00" SetFocusOnError="true"></asp:RequiredFieldValidator>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            Hora
                                                        </td>
                                                        <td>
                                                             <asp:DropDownList ID="DropDownListHora" Width="210px" runat="server">
                                                                <asp:ListItem Text="--  Seleccione --" Selected="True"></asp:ListItem>
                                                            </asp:DropDownList>
                                                            
                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorHora" runat="server" 
                                                                    ControlToValidate="DropDownListHora" InitialValue="--  Seleccione --"
                                                                     ErrorMessage="* Debe indicar Hora" ForeColor="#FFCC00" SetFocusOnError="true"></asp:RequiredFieldValidator>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            Sentido
                                                        </td>
                                                        <td>
                                                             <asp:DropDownList ID="DropDownListSentido"  Width="210px" runat="server">
                                                                <asp:ListItem Text="--  Seleccione --" Selected="True"></asp:ListItem>
                                                            </asp:DropDownList>
                                                            
                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorSentido" runat="server" 
                                                                    ControlToValidate="DropDownListSentido" InitialValue="-- Seleccione --"
                                                                     ErrorMessage="* Debe indicar Sentido" ForeColor="#FFCC00" SetFocusOnError="true"></asp:RequiredFieldValidator>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                        <tr>
                                              <td><br /></td>
                                        </tr>
                                        <tr>
                                            <td align="center">
                                                <span class="art-button-wrapper">
                                			        <span class="l"> </span>
                                			        <span class="r"> </span>
                                			        <asp:Button ID="ButtonConfiguracion" CssClass="art-button" runat="server" Text="Agregar" OnClick ="Button_AgregarConfiguracion"/>
                                   			    </span> 
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><br /></td>
                                        </tr>
                                        <tr>
                                            <td align="center">
                                                <asp:SqlDataSource ID="SqlDataSourceConfigReporte" runat="server" 
                                                    ConnectionString="<%$ ConnectionStrings:BD_ReporteTraficoConnectionString %>" 
                                                    SelectCommand="ConsultaConfiguracionReporte" 
                                                    SelectCommandType="StoredProcedure">               
                                                    <SelectParameters>
                                                        <asp:ControlParameter ControlID="LabelIdUsuario" Name="usuario" 
                                                            Type="Int32" PropertyName="Text" />
                                                    </SelectParameters>
                                                </asp:SqlDataSource>
                                                
                                                <asp:GridView ID="GridViewInformacion" runat="server" ShowHeaderWhenEmpty ="False"
                                                       AutoGenerateColumns="False" DataSourceID ="SqlDataSourceConfigReporte"                
                                                        DataKeyNames="ID_REPORTE" CellPadding="4" GridLines="None" HorizontalAlign ="Center" 
                                                        BorderStyle="Outset" SelectedRowStyle-Wrap="False" AllowPaging="True" 
                                                    PagerSettings-Mode="NextPreviousFirstLast" 
                                                    OnRowDeleting="GridViewDeleteConfigReporte">
                                                        <EmptyDataRowStyle ForeColor="#FFCC00" 
                                                            HorizontalAlign="Center" VerticalAlign="Middle" BorderStyle="None" />
                                                        <Columns>
                                                            <asp:BoundField DataField="ID_REPORTE" HeaderText="ID_REPORTE" 
                                                                SortExpression="ID_REPORTE" Visible="false"/>
                                                            <asp:BoundField DataField="HORA" HeaderText="HORA" ReadOnly="True" 
                                                                SortExpression="HORA" />
                                                            <asp:BoundField DataField="UBICACION" HeaderText="UBICACION" ReadOnly="True" 
                                                                SortExpression="UBICACION" />
                                                            <asp:BoundField DataField="SENTIDO" HeaderText="SENTIDO" ReadOnly="true"
                                                                SortExpression="SENTIDO" />
                                                            <asp:CommandField ButtonType="Image" 
                                                                DeleteImageUrl="~/imagenes/button_eliminar.jpg" ShowDeleteButton="True" />
                                                        </Columns>
                                                        <SelectedRowStyle Wrap="False" />
                                                        <HeaderStyle BackColor="#ffcc00" Font-Bold="True" ForeColor="Black" />
                                                         <PagerSettings Mode="NextPreviousFirstLast"></PagerSettings>

                                                        <RowStyle BackColor="#cccccc" ForeColor="Black" />
                                                         <AlternatingRowStyle BackColor="#cccccc" ForeColor="Black" />
                                                        
                                                         <EmptyDataTemplate>
                                                             ¡ No existen configuraciones de Reporte !. Configure su Reporte de Tráfico
                                                        </EmptyDataTemplate>
                                                     
                                                </asp:GridView>
                                                        
                                            </td>
                                        </tr>
                                    </table>
 
                                  <!-- hasta aqui va el contenido --> 
                            </div>
                            
                            <div class="cleared"></div>
                        </div>
                        
                            
                        </div>

                    </div>
                    <div class="art-sidebar2">
                        <div class="art-Block">
                            <div class="art-Block-body">
                                <div class="art-BlockHeader">
                                    <!--aqui iria el inicio de sesion  o el nombre de la persona logueada -->
                                     <table>
                                            <tr>
                                                <td><asp:Label ID="LabelIdUsuario" runat="server" Visible="false"></asp:Label></td>
                                            </tr>
                                            <tr align="center">
                                                <td align="left"><asp:Label ID="LabelUsuario" runat="server" ForeColor="#FFCC00" Visible="false"></asp:Label></td>
                                                <td align="left"><asp:HyperLink ID="HyperLinkCerrarSesion" Text="Cerrar Sesión" runat="server" Visible="false"
                                                                                        NavigateUrl="~/index.aspx"/></td>
                                            </tr>
                                     </table>
                                     
                                </div>
                                <div class="art-BlockContent">
                                    <div class="art-BlockContent-tl"></div>
                                    <div class="art-BlockContent-tr"></div>
                                    <div class="art-BlockContent-bl"></div>
                                    <div class="art-BlockContent-br"></div>
                                    <div class="art-BlockContent-tc">
                                    
                                        <br />
                                        <br />
                                    
                                    </div>
                                    <div class="art-BlockContent-bc"></div>
                                                                           <div>
                                        <!-- aqui van los controles para iniciar sesion o las distintas opciones de mantenimiento de usuario-->
                                                            <table>
                                                                <tr>
                                                                    <td>
                                                                        Tu cuenta... &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                                                                                                                      </td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="center">
                                                                        <span class="art-button-wrapper">
                                			                                <span class="l"> </span>
                                			                                <span class="r"> </span>
                                			                                <asp:Button ID="ButtonModificarDatos" CssClass="art-button" runat="server" 
                                                                            Text="Modificar mis Datos" PostBackUrl="~/ModificarDatosUsuario.aspx" CausesValidation="false"/>
                                			                                
                                		                                </span>
                                                                    </td>
                                                                   </tr>
                                                               </table>  
                                                          </div>
                                         <%--</div>--%>
                                    </div>
                                </div>
                            </div>
                       </div>
                    </div>
                </div>
                <div class="cleared"></div>
                
                <div class="art-Footer">
                    <div class="art-Footer-inner">
                        <div class="art-Footer-text">
                            <p><a href="#">Contact Us</a> | <a href="#">Terms of Use</a> | <a href="#">
                                Trademarks</a>
                                | <a href="#">Privacy Statement</a><br />
                                Copyright © 2009 . All Rights Reserved.</p>
                        </div>
                    </div>
                    </div>
                    <div class="art-Footer-background"></div>
                </div>
                
                
        <div class="cleared"></div>
        <p class="art-page-footer">XHTML and CSS valid. Powered by <a href="http://www.flashmint.com/">
            FlashMint</a> - flash web templates provider.</p>
   
<div style="text-align: center; font-size: 0.75em;">Design downloaded from <a href="http://www.freewebtemplates.com/">
    free website templates</a>.</div>

    </form>
</body>
</html>